package org.example.aiagent.demo.tools;

import jakarta.annotation.Resource;
import org.example.aiagent.demo.entity.Gun;
import org.example.aiagent.demo.mapper.GunMapper;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class GunsInfoTool {
    @Resource
    private GunMapper gunMapper;


    @Tool(description = "从数据库中获取枪械信息")
    public List<Gun> queryGuns() {
        return gunMapper.selectList(null);
    }
}
